﻿using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WpfApp.Services;
using WpfApp.Utils;

namespace WpfApp.ViewModels
{
    public partial class MainViewModel : ObservableObject
    {
        [ObservableProperty]
        private string _title = "主页";

        public ConsoleService ConsoleService { get; set; }

        public MainViewModel() { }


        public MainViewModel(ConsoleService consoleService)
        {
            ConsoleService = consoleService;
        }
        [RelayCommand]
        public void TestNotice()
        {
            MsgHelper.Info("测试Info");
        }

        [RelayCommand]
        public void TestConsole()
        {
            NLogHelper.Info("测试Info");
        }


        public void ConsoleInfo()
        {
            ConsoleService.Info("Info");
        }

        public void ConsoleDebug()
        {
            ConsoleService.Debug("Debug");

        }

        public void ConsoleError()
        {

            ConsoleService.Error("Error");
        }

        public void ConsoleWarning()
        {
            ConsoleService.Warning("Warning");
        }
    }
}
